import { axios as request } from '@/utils/request'

const backendVisitAPI = {
  getPVUVData: '/analytics/hTBackendVisitAction/getPVUVData',
  getStatistics: '/analytics/hTBackendVisitAction/getStatistics',
  getDistribution: '/analytics/hTBackendVisitAction/getDistribution',
  visit: '/analytics/hTBackendVisitAction/add',
  leave: '/analytics/hTBackendVisitAction/visitEdit'
}

export function getPVUVDataRequest(parameters) {
  return request({
    url: backendVisitAPI.getPVUVData,
    method: 'get',
    data: parameters
  })
}

export function getStatisticsRequest(parameters) {
  return request({
    url: backendVisitAPI.getStatistics,
    method: 'get',
    data: parameters
  })
}

export function getDistributionRequest(parameters) {
  return request({
    url: backendVisitAPI.getDistribution,
    method: 'get',
    data: parameters
  })
}

export function visitBackendRequest(parameters) {
  return request({
    url: backendVisitAPI.visit,
    method: 'post',
    data: parameters
  })
}

export function leaveBackendRequest(parameters) {
  return request({
    url: backendVisitAPI.leave,
    method: 'post',
    data: parameters
  })
}

